<template>
    <div>
        <div class="space20">
        </div>
        <el-form :inline="true" label-width="150px" class="demo-form-inline">
            <el-form-item label="用户总花费：">
                {{result.RESULT_OTHER_COST}}
            </el-form-item>
               <!-- <el-form-item label="用户实际花费：">
                <span v-if="type!='意外死亡'||type!='意外残疾'">$</span> {{result.RESULT_OTHER_COST-result.RESULT_OTHER_PAY}}
            </el-form-item> -->
            <el-form-item label="应赔付：">
                 <span v-if="type!='意外死亡' && type!='意外残疾'">$</span>
                <span v-else>
                    ¥
                </span> 
                {{result.RESULT_OTHER_PAY}}
            </el-form-item>
            <el-form-item label="汇率：" v-if="type!='意外死亡'||type!='意外残疾'">
                {{result.RESULT_OTHER_HUILV}}
            </el-form-item>
            <el-form-item label="赔付状态：">
                {{result.RESULT_OTHER_PAYSTATE}}
            </el-form-item>
          
            <el-form-item label="支付汇率：">
                {{result.RESULT_OTHER_PAYPEOPLEHUILV}}
            </el-form-item>
            <el-form-item label="支付金额：">
                ¥{{result.RESULT_OTHER_PAYPEOPLE}}
            </el-form-item>
        </el-form>
        <keep-alive>

            <rescueMeidcaUp v-if="type=='紧急医疗'" :name="'紧急医疗'" :state="'结果'"> </rescueMeidcaUp>
            <rescueChanger v-if="type=='紧急转院'" :name="'紧急转院'" :state="'结果'"> </rescueChanger>
            <rescueReturned v-if="type=='紧急运返'" :name="'紧急运返'" :state="'结果'"> </rescueReturned>
            <harmDieUp v-if="type=='意外死亡'" :state="'结果'"> </harmDieUp>
            <harmDisabilityUp v-if="type=='意外残疾'" :state="'结果'"> </harmDisabilityUp>
            <rescueAccompanyUp v-if="type=='陪同费'" :name="'陪同费'" :state="'结果'"> </rescueAccompanyUp>
            <rescueVisitUp v-if="type=='探访费'" :name="'探访费'" :state="'结果'"> </rescueVisitUp>
            <rescueInterUp v-if="type=='遗体运返或安葬'" :name="'遗体运返或安葬'" :state="'结果'"> </rescueInterUp>
            <studyBreakUp v-if="type=='学业中断'" :state="'结果'"> </studyBreakUp>
            <travelDelayUp v-if="type=='旅行延误'" :state="'结果'"> </travelDelayUp>
            <travelLoseUp v-if="type=='物品丢失'" :state="'结果'" :name="'物品丢失'"> </travelLoseUp>
            <threeUp v-if="type=='个人第三者'" :state="'结果'"> </threeUp>
        </keep-alive>

    </div>
</template>
<script>


import rescueMeidcaUp from '@/components/lipei/lipeiaddForm/rescueMeidca'
import rescueChanger from '@/components/lipei/lipeiaddForm/rescueMeidca'
import rescueReturned from '@/components/lipei/lipeiaddForm/rescueMeidca'

import harmDieUp from '@/components/lipei/lipeiaddForm/harmDie'
import harmDisabilityUp from '@/components/lipei/lipeiaddForm/harmDisability'



import rescueAccompanyUp from '@/components/lipei/lipeiaddForm/rescueAccompany'
import rescueVisitUp from '@/components/lipei/lipeiaddForm/rescueVisit'
import rescueInterUp from '@/components/lipei/lipeiaddForm/rescueInter'
import studyBreakUp from '@/components/lipei/lipeiaddForm/studyBreak'
import travelDelayUp from '@/components/lipei/lipeiaddForm/travelDelay'
import travelLoseUp from '@/components/lipei/lipeiaddForm/travelLose'
import threeUp from '@/components/lipei/lipeiaddForm/three'


export default {
    data() {
        return {
            type: "",
            result: {}
        }
    },
    components: {
        'rescueMeidcaUp': rescueMeidcaUp,
        'rescueChanger': rescueChanger,
        'rescueReturned': rescueReturned,

        'harmDieUp': harmDieUp,
        'rescueMeidcaUp': rescueMeidcaUp,
        'harmDisabilityUp': harmDisabilityUp,


        'rescueAccompanyUp': rescueAccompanyUp,
        'rescueVisitUp': rescueVisitUp,
        'rescueInterUp': rescueInterUp,
        'studyBreakUp': studyBreakUp,
        'travelDelayUp': travelDelayUp,
        'travelLoseUp': travelLoseUp,
        'threeUp': threeUp
    },
    activated() {
        this.type = this.$route.query["type"];
        this.$http.get("ResultOther?id=" + this.$route.query["id"] + " &type=" + this.type).then(response => {
            var data = response.body;
            if (data.code == 1) {
                this.result = data.result[0];
                this.result.RESULT_OTHER_COST = this.result.RESULT_OTHER_COST == null ? 0 : this.result.RESULT_OTHER_COST;
            } else {
                this.$notify.error({
                    title: '失败',
                    message: '数据获取失败'
                });
            }
        }, response => {
            this.$notify.error({
                title: '网络错误',
                message: '网络错误'
            });
            this.loding = false;
        });

    }
}
</script>
   